﻿using System.Collections.Generic;
using NUnit.Framework;

namespace csvmb.csvwerk.tests
{
    [TestFixture]
    public class Teste_Spaltennamen_bestimmen
    {
        [Test]
        public void Aus_einer_Spalte()
        {
            var sut = new Spaltennamen_bestimmen();
            IEnumerable<string> result = null;
            sut.Result += x => result = x;

            sut.Process("Name");

            Assert.AreEqual(new[] { "Name" }, result);
        }

        [Test]
        public void Aus_mehreren_Spalten()
        {
            var sut = new Spaltennamen_bestimmen();
            IEnumerable<string> result = null;
            sut.Result += x => result = x;

            sut.Process("Name;Tel");

            Assert.AreEqual(new[] { "Name", "Tel" }, result);
        }
    }
}